Insertion sorter

ABSTRACT

An insertion sorter circuit and method are provided which are particularly useful for sorting channel response values of a communication signal. The sorter circuit includes a series of sorter elements which each have a register. The circuit is configured to cascade values downwardly when one register receives a greater value than it has stored, which value is not greater than the value stored in any upstream register. At the end of processing the values, the most significant values are stored in the registers, the sum of which are the channel power estimate. The channel noise variance is obtainable by applying a system dependent scaling factor to the sum of the least significant values processed.

BACKGROUND

[0001] The invention generally relates to wireless communication systems. In particular, the invention relates to an insertion sorter used in conjunction with estimation of noise variance within a time division multiple access (TDMA), or time division-code division multiple access (TD-CDMA) receiver.

[0002] Communication systems using TDMA and TD-CDMA signals are well known in the art. For simplicity, both types of signals are referred to as TDMA hereinafter. In communications between a user equipment (UE) and a base station, the TDMA signal has a frame structure with a plurality of time slots. For certain types of signals, each of the time slots includes two data bursts that are separated by a user specific midamble. The data bursts transmit the desired data and, the user specific midamble is used to perform channel estimation. The midamble contains a series of chips, which in turn are processed through a filter to produce a series of channel response taps.

[0003] Among the series of channel response taps are signal taps, which represent the communication signal, with the remaining taps representing noise. Depending on the specific type of TDMA system architecture, the number of signal taps is designated by a fixed predetermined value.

[0004] A TDMA receiver must screen the channel response taps to determine which taps are the signal taps. The signal taps are those taps having the greatest value. A sorter is conventionally used to identify the most significant taps as the signal taps. Several iterations of the sorter are typical of a system using conventional bubble sort methods. It is desirable to provide a sorter with a minimal number of hardware components and arranged to provide a high degree of sorting efficiency.

SUMMARY

[0005] The present invention provides a system having a sorter circuit which determines a selected number of greatest values from a set of values. The system is used for a TDMA receiver as an insertion sorter for identifying peak values of a communication channel response and determining the sum of the non-peak values. The resultant values are then used in a conventional manner to process received communication data.

[0006] For a sort depth N, the sorter circuit is configured to store N peak channel response values sorted in descending order from a set of L values. The remaining L-N channel response values are considered to be noise and are summed using a single adder, and stored in a single register as an overall noise value. The sorter circuit comprises N series—connected sorter elements. Each sorter element has a comparator and a register. A set of channel response values is sequentially processed by inputting each value simultaneously to all the sorter elements in parallel. Processing the set of channel responses with parallel inputs to each sorter element minimizes the operating time of the system such that the number of clock cycles is equal to the number of channel response values processed.

[0007] Noise variance of the communication signal can be calculated by applying to the sum of the non-peak values a predetermined scaling factor appropriate for the specific type of communication system.

[0008] Other objects and advantages of the invention will be apparent to those skilled in the art from the following description.

BRIEF DESCRIPTION OF THE DRAWINGS

[0009]FIG. 1 shows a block diagram for a single sorter element of an insertion sorter circuit.

[0010]FIG. 2 shows a block diagram for an insertion sorter circuit with series-connected multiple sorter elements.

[0011]FIG. 3A shows a typical TDMA midamble with 57 channel response taps.

[0012]FIG. 3B shows a table of insertion sorter register contents for several clock pulses.

[0013]FIG. 4 shows a block diagram of an insertion sorter circuit with three sorter elements.

[0014]FIG. 5 shows the algorithm for using the insertion sorter to determine noise variance of a communication signal.

[0015]FIG. 6 shows a block diagram of the channel response square accumulator that derives the input for the insertion sorter circuit of FIGS. 2 and 4.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0016] The present invention is described with reference to the drawing figures where like numerals represent like elements throughout. Referring to FIG. 1, there is shown a sort element 150, which comprises the basic building block of a sorter circuit 200 shown in FIG. 2. Preferably, the sorter circuit 200 is used to sort sets of communication signal channel response power values (CR values), but can be utilized to sort any set of random values.

[0017]FIG. 1 illustrates the configuration of a sorter element 150, which is adapted for downstream connection to a like sorter element. The sorter element 150 comprises a multiplexer (MUX) switch 100 _(i), a register 101 _(i), a comparator 102 _(i) and an AND gate 104 _(i).

[0018] The sorter element 150 has two outputs, namely an enable output 120 _(i) from the comparator 102 _(i) and a shift output 130 _(i) from the register 101 _(i). The sorter element 150 has two inputs, namely an enable input 120 _(i−1) for the AND gate 104 _(i) and a shift input value 130 _(i−1) for the MUX 100 _(i). As shown in FIG. 2, the sorter element 150 is connected downstream of a like circuit by coupling the downstream shift input to the upstream shift output, such that both are represented by 130 _(i).

[0019] The sorter element 150 also has a value input CR associated as input to both the MUX 100 _(i) and the comparator 102 _(i). When multiple sorter elements 150 are serially connected in a cascade for processing a set of CR values, individual CR values are input in parallel to all of the sorter elements for processing. The parallel input of the CR values for processing results in a processing cycle time for each CR value to be equal to the processing cycle time for one sorter element, since the same CR value is processed by each of the sorter elements during the same cycle.

[0020] The CR value input is an “A” input to the comparator 102 _(i). The comparator also has a “B” input 130 _(i) that receives the current value of register 101 _(i). If the CR value is greater than the current register value, i.e. the “A” input is greater than the “B” input, the enable output 120 _(i) of comparator 102 _(i) is a “high” value, otherwise it is a “low” value.

[0021] The MUX 100 _(i) is coupled to the register 101 _(i) by a MUX output 125 _(i) to output either the CR value from the CR input or the upstream register's value via the shift input 130 _(i−1). The AND gate 104 _(i) is coupled to the MUX 100 _(i) via an AND gate output 121 _(i). Output 121 _(i) of AND gate 104 _(i) is high when both enable inputs 120 _(i) and 120 _(i−1) are high, otherwise the output 121 _(i) is low. When output 121 _(i) is high, the MUX 100 _(i) directs the value input 130 _(i−1) to register 101 _(i); when output 121 _(i) is low, the MUX 100 _(i) directs the CR input to register 100 _(i) via MUX output 125 _(i).

[0022] Register 101 _(i) receives a clock pulse during each cycle, which triggers the register to change its value by loading the output 125 _(i) of the MUX 100 if the comparator output 120 _(i) is high. Otherwise the register value remains unchanged.

[0023] Where sorter element 150 is connected in a series of like elements, when comparator output 120 _(i) is high, the output of all downstream comparators are also high. This results in both inputs of each AND gate 104 _(i) of all downstream sorter elements to also be high, so that the value of register 100 _(i) is passed to the register of the next downstream element in each case. Thus, starting with the first register that has a value lower than the CR value being processed, the register values shift downwardly while maintaining an automatic sort of the processed values.

[0024] As shown in FIG. 2, any desired number N of sorter elements 150 ₁ . . . 150 _(N) may be serially connected to configure a sorter circuit 200. The first sorter element 150 ₁ is modified slightly to eliminate the MUX and the AND gate since the only input to the first sorter circuit 150 ₁ is the CR value input.

[0025] The last sorter element 150 _(N) in sorter circuit 200 has its comparator's enable output 120 _(N) and register's value output 130 _(N) coupled to a MUX 110. MUX 110 has a CR value input and outputs the CR value to a summer/accumulator 105 during each cycle unless the comparator enable output 120 _(N) is high. For a high enable output 120 _(N), output 130 _(N) from register 101 _(N) is passed through MUX 110 to summer/accumulator 105. Summer/accumulator 105 adds the value input from MUX 110 to a stored value. That sum is output to a register 106 as a noise value and is also returned to the summer as its stored value for the next cycle.

[0026] In operation, sorter circuit 200 receives a new CR value for each cycle. Upon the clock pulse being sent to all the registers in the sorter elements 150 ₁-150 _(N), that CR value will either be stored in one of the registers or passed through MUX 110 to summer 105. Where the CR value is stored in one of the registers 150 ₁-150 _(N), all downstream comparator outputs will be high so that the value of the register in sorter element 150 _(N) will pass through MUX 110 to be summed by the summer/accumulator 105. Accordingly, at the completion of processing of an arbitrary number L of random values, the N highest values will be stored in registers 101 ₁-101 _(N) in descending order and all values not so stored will have been summed by summer/accumulator 105. Where the set of random values are CR values which include N signal values, the N signal values will be contained in registers 150 ₁-150 _(N) and the remaining values will have been summed to represent a noise value in register 106.

[0027] Although the sorter circuit 200 is particularly useful in sorting CR values, it can be employed to sort any set of values. If the set has L values and L<N, all L values will reside in the registers 150 ₁-150 _(N) and the summer/accumulator 105 output will be 0.

[0028]FIG. 2 shows insertion sorting circuit 200, which has a desired number N sort elements 150 . . . 150 _(N) cascaded to produce a sort depth N. Although the limit to the number of N sort elements is a factor of desired circuit size and power consumption considerations, time limits are not constraining because of the parallel input characteristics of the series of N sorter elements. During each process cycle, register 101 _(i) of each sorter element 150 in sorting circuit 200 keeps its currently stored value, or updates its value with the current channel response CR value, or updates its value with the stored channel response CR value of the register 101 _(i−1) directly upstream.

[0029] Turning to FIG. 3A, a data stream representative of a TDMA midamble of length L_(m)=57 chips is shown. These are processed to provide a set of 57 channel response taps from which the CR values are derived for processing in accordance with the sorter circuit of the present invention. FIG. 6 shows a block diagram of a circuit for producing CR values. Channel response taps are comprised of real and imaginary components. The real channel response taps are stored by registers R_(CRR1) and R_(CRR2) as duplicate values, and then squared by a multiplier 201. Similarly, the imaginary channel response taps are stored in duplicate in registers R_(CRI1) and R_(CRI2) and squared by a multiplier 202. An adder 203 receives the squared real and imaginary values and sends the sum to a register PSA. Register PSA accordingly stores real values since the square of the imaginary components results in a real number. These values are the preferred CR values that are sorted by the insertion sorter circuit 200.

[0030] A predetermined number N of CR values are intended to represent an estimate of channel responses that contain the actual communication signal, while the remaining number M of channel responses have values that are less than each of the N peak values, and thus are presumed to be noise on the channel. Accordingly, for the example shown in FIG. 3A, the number M of channel responses that represent noise are: M=L_(m)−N=57−3=54.

[0031] It should be recognized that the number L_(m) of channel responses may be a number other than 57, and that the number N of signal elements can also vary. Some values typical in TDMA systems are L_(m)=28, 32, 64, 57 and 114, while signal element values are typically N=6 or N=10. In the following example, an arrangement of sorter elements where N=3 will be described for simplicity. FIG. 4 shows an insertion sorter circuit 300 with three registers 100 ₁, 100 ₂, 100 ₃ that contain sorter element values P1, P2, and P3, respectively. At time t=0, each sorter element is initialized so that registers 101 ₁, 101 ₂, and 101 ₃ contain the value 0. This is reflected in the register table shown in FIG. 3B at time t=0. As shown in FIG. 3A, it is assumed that a sequence of 57 channel responses will be loaded into the insertion sorter circuit 300, one value at a time, with each clock pulse.

[0032] At time t=1, the first channel response value CR=10 is present at the A-side of comparators 102 ₁, 102 ₂ and 102 ₃, the input of register 101 ₁, and the low (0) input of multiplexers 100 ₂ and 100 ₃. Simultaneously, each comparator 102 ₁, 102 ₂, 102 ₃ evaluates the expression 10>0 and produces a high output to the enable signals 120 ₁, 120 ₂ and 120 ₃. Register 101 ₁ receives the high enable signal 120 ₁ and accordingly loads the value “10” from its input. MUX 100 ₂ receives a high enable input 121 ₂ from AND gate 104 ₂, while register 101 ₂, with its high enable input 120 ₂, loads the value “0” from register 101 ₁.

[0033] Similarly, the value “0” from register 101 ₂ is transferred through MUX 100 ₃ and subsequently loads into register 101 ₃, since MUX 100 ₃ and register 101 ₃ have a high enable signal 121 ₃. The initial content value P3=0 for register 101 ₃ is passed through MUX 110 to the input of adder 105 and on to register 106 as the first stored NOISE value. Accordingly, as shown in FIG. 3B at time t=1, the first clock pulse produces register values of P1=10, P2=0, P3=0 and NOISE=0.

[0034] In the next clock pulse at t=2, the channel response value CR=3 is loaded into each sort element of sorter circuit 300 at the low (0) input of multiplexers 100 ₂, 100 ₃, and 110, and the “A” inputs of comparators 102 ₁, 102 ₂ and 102 ₃. The channel response value CR=3 is present at register 101 ₁, but register 101 ₁ does not load this value since condition (A<B) is present at comparator 102 ₁ and the enable signal 120 ₁ is low as a result. Register 101 ₂ loads the value “3” from the low side of MUX 100 ₂, as enable signal 121 ₂ is low at MUX 100 ₂ and enable signal 120 ₂ is high at register 101 ₂. The previously stored value P2=0 from register 101 ₂ is passed through MUX 100 ₃ and loaded into register 101 ₃, since enable signals 120 ₃ and 121 ₃ are high. MUX 110 receives the value “0” from register 101 ₃, which in turn is loaded into input “A” of adder 105, and is summed with the sum NOISE=0 stored from the prior clock pulse t=0. The new total value NOISE at register 106 becomes: NOISE=A+B=0+0=0. Consequently, the sort element values after the second clock pulse are P1=10, P2=3, P3=0, and NOISE=0, as shown in FIG. 3B at t=2.

[0035] The foregoing process is repeated at each successive clock pulse. After the occurrence of the third clock pulse (t=3), the third channel response CR=9 is retained by the second register 101 ₂ and the second channel response value CR=3 is shifted to the third register 101 ₃. Not until the channel response CR=N+1, does the insertion sorter circuit 300 produce a noise value, since there are N registers representative of the channel signal. Accordingly, after the fourth clock pulse (t=4), the insertion sorter circuit 300 recognizes the lowest of the first four channel response CR values as NOISE, which in this example is the fourth channel response CR=2. At the fifth clock pulse (t=5), the channel response value CR=12 is loaded into the first register 101 ₁, replacing the prior peak value P₁ from the fourth clock pulse, P₁=10. Register 101 ₂ receives the value “10” from MUX 100 ₂, and the former content of register 101 ₂ is stored into register 101 ₃ via MUX 100 ₃. The value “3” from register 101 ₃ is passed through MUX 110, sent to adder 105 port “A”, and is added to the value NOISE=2 for a total noise value NOISE=5 at register 106.

[0036] This process is repeated until all 57 CR values are sorted by sorter insertion circuit 300. In the end, register 101 ₁ will contain the peak channel response value, P1 _(MAX), register 101 ₂ will contain P2 _(MAX) and register 101 ₃ will contain P3 _(MAX) where P1 _(MAX)≧P2 _(MAX)≧P3 _(MAX). After 57 clock pulses, register 106 will contain the total noise value NOISE, which is the sum of M=54 noise values.

[0037]FIG. 5 shows an algorithm that makes use of the insertion sorter circuit 200. Input signal CR represents the squared sum of the real and imaginary channel response taps produced by circuit 400 of FIG. 6. The insertion sorter circuit 200 embodies the block 510, 515 and 525 functions. The block 510 of selection and sorting of the N most significant channel response elements is achieved by the comparisons performed by the sorter element comparators 102 ₁ . . . 102 _(N), and the storage and shifting of the sorter element registers 101 ₁ . . . 101 _(N). The sorter element comparators 102 ₁ . . . 102 _(N) and registers 101 ₁ . . . 101 _(N) likewise perform the block 515 function of selection of the M least significant channel response elements by passing and not storing the least significant values in registers 101 ₁ . . . 101 _(N). The block 525 sum function is performed by the adder 105 and is stored in register 106. Block 520 is implemented by tapping of the registers 101 ₁ . . . 101 _(N) and summing the sorted values stored by them once the processing of the series of CR values is completed (not shown in FIG. 2) to form value P_(G), which represents the channel power estimate. The noise variance σ² is produced by multiplying the value P_(S), the sum of the noise values stored in register NOISE, with a predetermined scaling factor C_(S), which is a function of the number of paths and the channel length for the particular system.

[0038] Although the invention has been described in part by making detailed reference to certain specific embodiments, such detail is intended to be instructive rather than restrictive. It will be appreciated by those skilled in the art that many variations may be made in the structure and mode of operation without departing from the spirit and scope of the invention as disclosed in the teachings herein. 

What is claimed is:
 1. A system having an insertion sorter circuit for determining a predetermined number N of most significant values of a set of random values comprising: a plurality of N series-connected sorter elements SE_(i), for each integer i from 1 to N, for sequentially processing the set of values; each sorter element SE_(i) sequentially receiving the random values in parallel and including: a register R_(i) for storing a most significant value; and a two element comparator C_(i) for comparing the stored R_(i) value to a received value of the set of random values; and each sorter element SE_(i) for i>1, also including: a multiplexer M_(i) for selecting between the received value and a register stored value and loading the selected value into the register R_(i) when the received value is greater than the stored R_(i) value; sorter element SE₁ configured to load the received value into register R₁ when the received value is greater than the value stored in R₁; and said sorter elements SE₁ to SE_(N) connected in series such that, for each i>1, the register stored value of the multiplexer M_(i) is output from the register R_(i−1) when the comparator C_(i−1) determines that the received value is greater than the R_(i−1) stored value, whereby the registers R₁ to R_(N) store N most significant values in a descending order after sequentially processing the series of random values.
 2. The system of claim 1 further comprising: an adder for summing values of the random value series which are not stored as most significant values after sequentially processing of the random value series; and a register for storing the sum of the random values not stored as most significant values.
 3. The system of claim 2 which further comprises a circuit for processing received communication data to produce a set of random values representing midamble tap sequence values of a communication signal which are provided to said sorter circuit for processing whereby the N most significant values after sequentially processing the set of random values represent N channel response values of the communication signal, and the sum of the random values, which does not include the N most significant values after sequentially processing the series of random values, represents noise of the communication signal.
 4. The system of claim 2 where the sorter elements SE₁ to SE_(N) and the adder operate in parallel to process one random value during each processing cycle such that the number of cycles needed for sorting and summation is equal to the number of values in the set of random values that are sorted, whereby clock speed of the sorter circuit is unaffected by the number N of sorter elements.
 5. A system which processes received communication data where a set of random values represents midamble tap sequence values of a communication signal, N most significant values of the set of random values represent N channel response values of the communication signal, and the sum of the random values which does not include the N most significant values of the set of random values represents noise of the communication signal comprising: a plurality of N series-connected sorter elements SE_(i), for each integer i from 1 to N, for sequentially processing the set of values; each sorter element SE_(i) sequentially receiving the random values in parallel and including: a register R_(i) for storing a most significant value; and a two element comparator C_(i) for comparing the stored R_(i) value to a received value of the set of random values; and each sorter element SE_(i) for i>1, also including: a multiplexer M_(i) for selecting between the received value and a register stored value and loading the selected value into the register R_(i) when the received value is greater than the stored R_(i) value; sorter element SE₁ configured to load the received value into register R₁ when the received value is greater than the value stored in R₁; and said sorter elements SE₁ to SE_(N) connected in series such that, for each i>1, the register stored value of the multiplexer M_(i) is received from the register R_(i−1) when the comparator C_(i−1) determines that the received value is greater than the R_(i−1) stored value whereby the registers R₁ to R_(N) store N most significant values in a descending order after sequentially processing the series of random values; and an adder circuit for summing values of the random value series which are not stored as most significant values after sequentially processing of the random value series, the adder circuit also sequentially receiving the random values in parallel with said sorting elements and a register stored value from the register R_(N) when the comparator C_(N) determines that a received value is greater than the R_(N) stored value including: a register R_(S) for storing the sum of the random values not stored as most significant values; and an adder which sums the value stored in the register R_(S) with the lesser of the received random value and the register stored value of the register R_(N) and stores the summed value in register R_(S).
 6. The system of claim 5 where the sorter elements SE₁ to SE_(N) and the adder circuit operate in parallel to process one random value during each processing cycle such that the number of cycles needed for sorting and summation is equal to the number of values in the series of random values that are sorted, whereby clock speed of the sorter circuit is unaffected by the number N of sorter elements.
 7. A method for determining a predetermined number N of most significant values of a set of random values comprising: sequentially processing the set of random values using a plurality of series connected sorter elements SE_(i), for each integer i from 1 to N, each sorter element SE_(i) having a register R_(i) which is initialized with a zero value and each sorter element SE_(i) sequentially receiving the random values in parallel; for each received random value, the first sorter element SE₁: compares the stored R₁ value to the received value; selects between the received value and the stored R₁ value; and stores the selected value into the register R₁ when the received value is greater than the existing stored R₁ value; for each received random value, each sorter element SE_(i), for i>1: compares the stored R_(i) value to the received value; and stores a new value into the register R_(i) when the random value is greater than the existing stored R_(i) value, the new value being the random value, except when sorter element SE_(i−1) determines that the received value is greater than the R_(i−1) stored value, in which case the new value stored in register R_(i) is the register R_(i−1) value, whereby N most significant values are stored in a descending order in registers R₁ to R_(N) after processing all of the random values of the series.
 8. The method of claim 7 further comprising: providing an adder circuit which includes a register R_(S) which is initialized with a zero value and which also sequentially receives the random values in parallel with said sorting elements; for each received random value, the adder circuit: sums the value stored in the register R_(S) with the lesser of the received random value and the R_(N) stored value; and stores the summed value in register R_(S) whereby the sum of the values of the random value series which are not stored as most significant values is stored in register R after sequential processing of the random value series is completed.
 9. The method of claim 8 where the sorter elements SE₁ to SE_(N) and the adder circuit operate in parallel to process one random value during each processing cycle such that the number of cycles needed for sorting and summation is equal to the number of values in the series of random values that are sorted, whereby clock speed of the sorter circuit is independent of the number N of sorter elements.
 10. A method for processing received communication data where a set of random values represent midamble tap sequence values of a communication signal, N most significant values of the series of random values represent N channel response values of the communication signal, and a sum of the random values that do not include the N most significant values of the set of random values, the sum representing noise of the communication signal, the method for determining the N channel response values and noise of the communication signal comprising: sequentially processing the series of random values using an adder circuit having a register R_(S) initialized with a zero value and a series of sorter elements SE_(i), for each integer i from 1 to N, each sorter element SE_(i) having a register R_(i) initialized with a zero value and a comparator C_(i); sequentially receiving the random values in parallel by each sorter element SE_(i) and the adder circuit; for each received random value, the first sorter element SE₁: compares the stored R₁ value to the received value; and stores the selected value into the register R₁ when the received value is greater than the existing stored R₁ value; for each received random value, each sorter element SE_(i), for i>1: compares the stored R_(i) value to the received value; and stores a new value into the register R_(i) when the random value is greater than the existing stored R_(i) value, and the new value being the random value, except when sorter element SE_(i−1) determines that the received value is greater than the R_(i−1) stored value, in which case the new value stored in register R_(i) is the register R_(i−1) value, whereby N most significant values are stored in a descending order in registers R₁ to R_(N) after processing all values of the set of random values; and for each received random value, the adder circuit: sums the value stored in the register R_(S) with the lesser of the received random value and the R_(N) stored value; and stores the summed value in register R_(S) whereby the sum of the values of the random value series which are not stored as most significant values is stored in register R_(S) after sequential processing of the random value series is completed.
 11. The method of claim 10 where the sorter elements SE₁ to SE_(N) and the adder circuit operate in parallel to process one random value during each processing cycle such that the number of cycles needed for sorting and summation is equal to the number of values in the series of random values that are sorted, whereby clock speed of the sorter circuit is unaffected by the number N of sorter elements.
 12. A sorter circuit for sorting a set of random values representing midamble tap sequence values of a communication signal comprising a series of sorter elements, each element comprising: a register; an input for receiving a random value for processing in parallel with the other elements; and a register output; said elements connected in series such that when one register receives a greater value than it has stored, that register stores that greater value, and that register and each downstream register pass their values to the next successive downstream register. 